package com.haipumi.quartz;

import java.util.Date;
import java.util.Map;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.WebApplicationContext;

import com.haipumi.biz.TaskBiz;
import com.haipumi.utils.CommonData;
import com.haipumi.utils.LogUtil;

public class findRank {
	
	@Autowired
	private TaskBiz taskBiz;

	public void findIndexRank( ){
		Map<String,String> map=taskBiz.findRank();
		WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();
    	ServletContext servletContext = webApplicationContext.getServletContext();
    	servletContext.setAttribute(CommonData.APPLICATIONRANK, map);
    	LogUtil.log.warn("查询排行榜成功    "+new Date());
    }
	
}
